<?php

class Application_Model_PrivilegeTypeService extends Base_Service
{
   
	public function setPrivilege($ct, $cid, $pt) {		
		$db = $this->getDbAdapter();
		
		$row = array ( 
		'content_type' => $ct,
		'content_id' => $cid,
		'privilege_type' => $pt
		);
		$this->logger->debug(__METHOD__. '   ' .$row);		
		$rows_affected = $db->insert('content_privilege', $row);
		$last_insert_id = $db->lastInsertId();
		$this->logger->debug(__METHOD__. '   ' .$last_insert_id);
		
		return $last_insert_id;
		
	}
	protected static $_instance = null;
	public static function getInstance() {
        if (null === self::$_instance) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
}

